//
//  XSAllListTableViewCell.m
//  XSDataBaseDemo
//
//  Created by 大帅 on 2023/12/19.
//

#import "XSAllListTableViewCell.h"

@interface XSAllListTableViewCell ()
/** 详细信息 */
@property (nonatomic, strong) UILabel *infoLabel;

@end

@implementation XSAllListTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.infoLabel = [[UILabel alloc] init];
        self.infoLabel.textColor = UIColor.blackColor;
        self.infoLabel.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:self.infoLabel];
        [self.infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(self.contentView).insets(UIEdgeInsetsMake(5, 5, 5, 5));
        }];
    }
    return self;
}

-(void)setModel:(XSTestModel *)model {
    _model = model;
    self.infoLabel.text = [NSString stringWithFormat:@"%@  昵称:%@  年龄:%@  号码:%@", model.userId, model.userName, model.userAge, model.userPhone];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
